<HTML><HEAD>
	<SCRIPT>var isomorphicDir="../../isomorphic/";</SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
	<SCRIPT SRC=../../isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY BGCOLOR='papayawhip' MARGINHEIGHT=0 MARGINWIDTH=0 LEFTMARGIN=0 TOPMARGIN=0>
<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=5 BORDER=0><TR><TD CLASS=pageHeader BGCOLOR=WHITE>

	Event propagation example

</TD><TD CLASS=pageHeader ALIGN=RIGHT BGCOLOR=WHITE>

	Isomorphic SmartClient

</TD></TR></TABLE><TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=0 BORDER=0><TR>
<TD BGCOLOR=336666><IMG SRC=images/blank.gif WIDTH=1 HEIGHT=4></TD></TR></TABLE>


<!--------------------------
  Example code starts here
---------------------------->

<SCRIPT>

Page.setEvent("click","return confirm('Page received click event. Continue?');");

// Declaration Method 1:
// Instantiating children separately and attaching them to their parents.
// The autoDraw property must be set to false for each child.

Canvas.create({
    ID:"topWidget",
    left:50,
    top:75,
    width:300,
    height:300,
    contents:"top",
    backgroundColor:"skyblue",
    click:"return confirm('top received click event. Continue?')"
});

Canvas.create({
    ID:"parentWidget",
    autoDraw:false,
    left:50,
    top:50,
    width:200,
    height:200,
    contents:"parent",
    backgroundColor:"khaki",
    click:"return confirm('parent received click event. Continue?')"
});
topWidget.addChild(parentWidget);


Canvas.create({
    ID:"targetWidget",
    autoDraw:false,
    left:50,
    top:50,
    width:100,
    height:100,
    contents:"target",
    backgroundColor:"lightgreen",
    click:"return confirm('target received click event. Continue?')"
});
parentWidget.addChild(targetWidget);

/* 
// Declaration Method 2:
// Nesting children in a parent widget's declaration.
// The constructor property must be given for each child.

Canvas.create({
    ID:"topWidget",
    left:50,
    top:75,
    width:300,
    height:300,
    contents:"top",
    backgroundColor:"skyblue",
    click:"return confirm('top received click event. Continue?')",
    children:[
        Canvas.create({ 
            ID:"parentWidget",
            autoDraw:false,
            left:50,
            top:50,
            width:200,
            height:200,
            contents:"parent",
            backgroundColor:"khaki",
            click:"return confirm('parent received click event. Continue?')",
            children:[
                Canvas.create({
                    ID:"targetWidget",
                    autoDraw:false,
                    left:50,
                    top:50,
                    width:100,
                    height:100,
                    contents:"target",
                    backgroundColor:"lightgreen",
                    click:"return confirm('target received click event. Continue?')"
                })          
            
            ]
        })
    ]
});
*/

</SCRIPT>
</BODY>
</HTML>
